// src/config/menu.ts

import { HomeFilled, InfoFilled,Memo,Monitor,TakeawayBox,CreditCard,Promotion,Histogram } from '@element-plus/icons-vue';

// 定义菜单项的类型，方便代码提示和类型检查
export interface MenuItem {
    path: string;          // 路由路径
    name: string;          // 菜单名称
    icon?: any;            // 图标组件
    roles: string[];       // 允许访问的角色数组
}

// 权限菜单配置
export const menuConfig: MenuItem[] = [
    {
        path: '/main/home',
        name: '首页',
        icon: HomeFilled,
        roles: ['admin', 'teacher', 'student'],
    },
    {
        path: '/main/examSchedule',
        name: '考试安排',
        icon: Memo,
        roles: ['admin', 'student'],
    },
    {
        path: '/main/takeExam',
        name: '参加考试',
        icon: Monitor,
        roles: ['admin', 'student'],
    },
    {
        path: '/main/ViewGrades',
        name: '查看成绩',
        icon: TakeawayBox,
        roles: ['admin', 'student'],
    },
    {
        path: '/main/createExamSchedule',
        name: '创建考试安排',
        icon: CreditCard,
        roles: ['admin','teacher'],
    },
    {
        path: '/main/releaseExam',
        name: '发布考试',
        icon: Promotion,
        roles: ['admin','teacher'],
    },
    {
        path: '/main/studentPerformanceAnalysis',
        name: '学生成绩分析',
        icon: Histogram,
        roles: ['admin','teacher'],
    },
    {
        path: '/main/testPaperGrading',
        name: '试卷批改',
        icon: InfoFilled,
        roles: ['admin', 'teacher'],
    },
    {
        path: '/main/classManagement/teacher',
        name: '添加班级',
        icon: InfoFilled,
        roles: ['admin', 'teacher'],
    },
    {
        path: '/main/classManagement/student',
        name: '查看班级',
        icon: InfoFilled,
        roles: ['admin', 'student'],
    },
    {
        path: '/main/about',
        name: '关于我们',
        icon: InfoFilled,
        roles: ['admin', 'teacher', 'student'],
    },

];
